package com.xuelang.pipeline.worker.client.configmap;

import com.xuelang.pipeline.worker.client.common.result.ApiResult;
import com.xuelang.pipeline.worker.client.configmap.dto.ConfigMapDTO;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import jakarta.validation.Valid;

/**
 * @author liuyuan.ly
 * @since 2024/5/16 15:25
 */


public interface IConfigMapService {

    /**
     * 创建或修改config
     *
     * @param configMapDTO
     * @return
     */
    @PostMapping(value = "/saveOrUpdate", produces = "application/json;charset=utf-8")
    ApiResult<Boolean> saveOrUpdateConfigMap(@RequestBody @Valid ConfigMapDTO configMapDTO);

    /**
     * 删除configmap
     *
     * @param configMapDTO
     * @return
     */
    @PostMapping(value = "/delete", produces = "application/json;charset=utf-8")
    ApiResult<Boolean> deleteConfigMap(ConfigMapDTO configMapDTO);
}
